{extend name="base" /}
{block name="body"}
<div class="layui-card">
    <div class="layui-card-body">
    <blockquote class="layui-elem-quote layui-text">
        参数配置：<span class="text-danger"></span>
     </blockquote>
        <div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">
            <ul class="layui-tab-title">
                {volist name='list' id='v'}
                <li {if isset($v) and $v.id eq 1}class="layui-this"{/if} lay-id="{$v.id}">{$v.name}</li>
                {/volist}
            </ul>
            <div class="layui-tab-content">
                {volist name='list' id='v'}
                <div class="layui-tab-item {if isset($v.id) and $v.id eq 1}layui-show{/if}">
                    <form action="{:url('base',['id'=>$v.id])}" class="layui-form" method="post" enctype="multipart/form-data">
                        <input type="hidden" name="code" value="{$v.code}">
                        {volist name='v.children' id='vv'}
                        <div class="layui-form-item layui-form-text">
                            <label class="layui-form-label">{$vv.name}</label>
                            <div class="layui-input-block" style="max-width: 600px;">
                                {if condition="$vv.type eq 'textarea'"}
                                    <textarea name="{$vv.code}" class="layui-textarea">{$vv.value|default=''}</textarea>
                                {elseif condition="$vv.type eq 'checkbox'"}
                                    <input type="{$vv.type}" name="{$vv.code}" value="{$vv.value|default=''}" lay-skin="switch" lay-filter="*" lay-text="开启|关闭" {if isset($vv.value) and $vv.value eq 1}checked{/if}>
                                {elseif condition="$vv.type eq 'hidden'"}
                                    <img class="layui-upload-img" src="{$vv.value|default=''}" style="border-color: #5FB878;background-color: #5FB878;width: 50px;border-radius: 10%;">
                                {elseif condition="$vv.type eq 'file'"}
                                    <img class="layui-upload-img" id="test-upload-normal-img" src="{$vv.value|default=''}" style="width: 50px;border-radius: 10%;">
                                    <input type="hidden" name="{$vv.code}" value="{$vv.value|default=''}" autocomplete="off" placeholder="" class="layui-input">
                                    <button type="button" class="layui-btn ajax-avatar"><i class="fa fa-file-image-o"></i> 上传LOGO</button>
                                {elseif condition="$vv.type eq 'img'"}
                                    <img class="layui-upload-img" id="test-upload-normal-img" src="{$vv.value|default=''}" style="width: 50px;border-radius: 10%;">
                                {else}
                                    <input type="{$vv.type}" name="{$vv.code}" value="{$vv.value|default=''}"  class="layui-input">
                                {/if}
                            </div>
                            <div class="layui-form-mid layui-word-aux">{$vv.aux|default=''}</div>
                        </div>
                        {/volist}
                        <div class="layui-form-item">
                            <div class="layui-input-block">
                                <button class="layui-btn" lay-submit  lay-filter="*">确认保存</button>
                            </div>
                        </div>
                    </form>
                </div>
                {/volist}
            </div>
        </div>
    </div>
</div>
{/block}
{block name='js'}{/block}
